package exception;
/*
* throws的演示*/
public class ThrowsDemo {
    public static void main(String[] args) {
     Student std = new Student();
        try {
            std.setAge(200);
        } catch (IllegalAgeException e) {
//            System.out.println(e.getMessage());
            e.printStackTrace();
        }
        System.out.println("此人年龄为"+std.getAge()+"岁");
    }
}
